import URLImage from '@/components/URLImage'
import { Image, Layer, Stage } from 'react-konva'
import useImage from 'use-image'

const LionImage = () => {
  const [image] = useImage('https://konvajs.org/assets/lion.png')
  return <Image image={image} />
}

export default function View() {
  return (
    <Stage width={window.innerWidth} height={window.innerHeight}>
      <Layer>
        <URLImage src='https://konvajs.org/assets/yoda.jpg' x={150} y={150} />
        <LionImage />
      </Layer>
    </Stage>
  )
}
